﻿<UserControl xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"  
    x:Class="GlobalOfficeTools.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:designViewModel="clr-namespace:GlobalOfficeTools.ViewModels"
    xmlns:sc="clr-namespace:SilverlightContrib.Controls;assembly=SilverlightContrib.Controls"
    xmlns:navigationFramework="clr-namespace:GlobalOfficeTools.Framework.ViewNavigation;assembly=GlobalOfficeTools.Framework"
    xmlns:slMenu="clr-namespace:SilverlightMenu.Library;assembly=SilverlightMenu.Library"
    xmlns:loadBehaviours="clr-namespace:GlobalOfficeTools.Behaviors"
    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
    DataContext="{Binding [MainPageViewModel],  Source = {StaticResource mvvLocator}}"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="700"
    d:DataContext="{d:DesignInstance Type=designViewModel:MainPageViewModelDesign, IsDesignTimeCreatable=True}" 
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">

    <toolkit:BusyIndicator IsBusy="{Binding IsBusy}">
        <Grid x:Name="LayoutRoot" Background="White">
            <i:Interaction.Behaviors>
                <loadBehaviours:TabNavByKey KeyToTab="Enter" NavigationMode="Cycle" />
            </i:Interaction.Behaviors>
            <Image Source="/GlobalOfficeTools;component/top_stretch.png" Stretch="Fill" Height="74" VerticalAlignment="Top"/>
            <TextBlock Height="34" HorizontalAlignment="Left" Margin="12,12,0,0" Name="textBlock1" Text="Global Office Tools" VerticalAlignment="Top" Foreground="White" FontSize="24" >
        	<TextBlock.Effect>
        		<DropShadowEffect/>
        	</TextBlock.Effect>
        </TextBlock>
            <Grid x:Name="grdLogin" Height="67" Margin="0,7,22,0" VerticalAlignment="Top" HorizontalAlignment="Right" Width="348" Visibility="{Binding LoginBoxVisibility}">
        	<Grid.ColumnDefinitions>
        		<ColumnDefinition Width="0.718*"/>
        		<ColumnDefinition Width="0.282*"/>
        	</Grid.ColumnDefinitions>
        	<TextBlock Height="17" Margin="0,1,0,0" TextWrapping="Wrap" Text="User Name:" VerticalAlignment="Top" Foreground="White" HorizontalAlignment="Left" Width="66"/>
        	<TextBlock Height="17" Margin="0,0,45,0" TextWrapping="Wrap" Text="Password:" VerticalAlignment="Top" Foreground="White" HorizontalAlignment="Right" Width="66"/>
            <TextBox Text="{Binding UserName, Mode=TwoWay}" Margin="0,17,0,0" TextWrapping="Wrap" HorizontalAlignment="Left" Width="117" Height="22" VerticalAlignment="Top" Style="{StaticResource GOT_TextBoxStyle}"/>
        	<PasswordBox Password="{Binding Password, Mode=TwoWay}" Margin="0,17,-6,0" Height="22" VerticalAlignment="Top" HorizontalAlignment="Right" Width="117" Style="{StaticResource GOT_PasswordBoxStyle}"/>
            <Button Command="{Binding LoginButton}" Content="Login" Margin="26,17,0,0" Height="22" VerticalAlignment="Top" Grid.Column="1"/>
        	<HyperlinkButton Content="Forgot Password" Height="15" VerticalAlignment="Top" HorizontalAlignment="Left" Width="102" Margin="0,43,0,0"/>
        	<CheckBox Content="Keep me logged" Height="15" Margin="0,43,-6,0" VerticalAlignment="Top" Foreground="White" HorizontalAlignment="Right" Width="117"/>
        </Grid>
            <Grid x:Name="grdUserDetails" Height="67" Margin="0,7,22,0" VerticalAlignment="Top" Width="348" HorizontalAlignment="Right" d:LayoutOverrides="Width" Visibility="{Binding UserDetailsBoxVisibility}">
        	<StackPanel Margin="0,0,124,5" d:LayoutOverrides="Width">
        		<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Width="224" VerticalAlignment="Top">
                    <TextBlock Margin="0" TextWrapping="Wrap" Text="Version:" Height="18" VerticalAlignment="Top" Width="65" Foreground="White"/>
                    <TextBlock Margin="0" TextWrapping="Wrap" Height="18" VerticalAlignment="Top" Width="158" Foreground="White" Text="{Binding SoftwareVersion}"/>
        		</StackPanel>
        		<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Width="224" VerticalAlignment="Top">
        			<TextBlock Margin="0" TextWrapping="Wrap" Text="User:" Height="18" VerticalAlignment="Top" Width="65" Foreground="White"/>
                    <TextBlock Margin="0" TextWrapping="Wrap" Height="18" VerticalAlignment="Top" HorizontalAlignment="Left" Width="158" Foreground="White" Text="{Binding LogonUserName}"/>
        		</StackPanel>
        		<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Width="224" VerticalAlignment="Top">
        			<TextBlock Margin="0" TextWrapping="Wrap" Text="Company:" Height="18" VerticalAlignment="Top" Width="65" Foreground="White"/>
        			<TextBlock Margin="0" TextWrapping="Wrap" Height="18" VerticalAlignment="Top" HorizontalAlignment="Left" Width="159" Foreground="White" Text="{Binding ActiveCompany}"/>
        		</StackPanel>
        	</StackPanel>
        	<Image Margin="243,0,0,0" Source="/GlobalOfficeTools;component/Images/32x32/mail.png" Stretch="Fill" RenderTransformOrigin="-2.562,0.438" Height="32" VerticalAlignment="Top" HorizontalAlignment="Left" Width="32"/>
        	<Image Margin="279,0,0,0" Source="/GlobalOfficeTools;component/Images/32x32/help.png" Stretch="Fill" RenderTransformOrigin="0.562,-0.344" Height="32" VerticalAlignment="Top" HorizontalAlignment="Left" Width="32"/>
        	<Image Margin="315,0,0,0" Source="/GlobalOfficeTools;component/Images/32x32/logout.png" Stretch="Fill" Height="32" VerticalAlignment="Top" HorizontalAlignment="Left" Width="32"/>
        </Grid>
            <slMenu:Menu Name="mnuMenu" ImagesPath="{Binding ImagesPath}" MenuItem="{Binding MenuItems}" Command="{Binding Path=MenuCommand}" Margin="0,74,0,203" />
            <sdk:Frame Margin="0,96,0,59" Name="frame1" Source="DashboardPage">
            <sdk:Frame.ContentLoader>
                <navigationFramework:NavigationController />
            </sdk:Frame.ContentLoader>
        </sdk:Frame>
        </Grid>
    </toolkit:BusyIndicator>
</UserControl>
